program Project1;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var
 n0, n, i: integer;
 x, y, p: real;
 fout: textfile;
begin
  assignfile(fout, 'output.txt');
  rewrite(fout);
  randomize;
  n0:=0;
  n:=0;
  for i:=1 to 1000000000 do
  begin
    x:=2*random;
    y:=2*random;
    if ((x-1)*(x-1)+(y-1)*(y-1)<=1) then
      n0:=n0+1;
    n:=n+1;
    p:=n0/n*4;
    if (i mod 100000 = 0) then
      writeln(fout, p:0:9);
  end;
  closefile(fout);
end.
